package com.sun.service.Impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sun.entity.Goods;
import com.sun.entity.Goodstype;
import com.sun.entity.Storage;
import com.sun.mapper.GoodsMapper;
import com.sun.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author rabbiter
 * @since 2023-01-06
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public IPage pageCC(IPage<Goods> page, Wrapper wrapper) {
        return goodsMapper.pageCC(page, wrapper);
    }

    @Override
    public List<Goods> getMuban() {
        return goodsMapper.getMuban();
    }

    @Override
    public Storage getStorageById(String storage) {
        return goodsMapper.getStorageById(storage);
    }

    @Override
    public Goodstype getGoodstype(String goodstype) {
        return goodsMapper.getGoodstype(goodstype);
    }

    @Override
    public void updataForFile(Integer id, Integer count) {
        goodsMapper.updataForFile(id, count);
    }
}
